package com.alameda.service.impl.commonback;

import com.alameda.common.base.dto.CommonDTO;
import com.alameda.common.commonpent.commonback.api.CommonBackTemplate;
import com.alameda.service.commonback.MediaCommonBackService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 通用后端 业务逻辑层 具体实现
 *
 * @author Lv
 * @date 2024/2/19
 */
@SuppressWarnings("all")
@Slf4j
@Service
public class MediaCommonBackServiceImpl<T> implements MediaCommonBackService {

    @Autowired
    private CommonBackTemplate<T> commonBackTemplate;

    /**
     * 通用获取详情
     *
     * @param commonDTO 通用后端信息
     * @return
     */
    @Override
    public T get(CommonDTO commonDTO) {
        return commonBackTemplate.get(commonDTO);
    }

    /**
     * 通用逻辑删除
     *
     * @param commonDTO 通用后端信息
     * @return
     */
    @Override
    public T remove(CommonDTO commonDTO) {
        return commonBackTemplate.remove(commonDTO);
    }
}
